<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:body>
        <ui:composition template="/template/common/commonLayout.xhtml">
            <ui:define name="menu">
            </ui:define>

            <ui:define name="content">

                <h2>Register with the ATM</h2>
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                <h:form>
                    <h:panelGrid columns="2">
                        <h:outputText value="First Name:"/>
                        <h:inputText id="firstName" value="#{clientBean.selectedClient.firstName}" title="First Name" />
                        <h:outputText value="Last Name:"/>
                        <h:inputText id="lastName" value="#{clientBean.selectedClient.lastName}" title="Last Name" />
                        <h:outputText value="Email:"/>
                        <h:inputText id="email" value="#{clientBean.selectedClient.email}" title="Email" />
                        <h:outputText value="Address:"/>
                        <h:inputText id="address" value="#{clientBean.selectedClient.address}" title="Address" />
                        <h:outputText value="Phone:"/>
                        <h:inputText id="phone" value="#{clientBean.selectedClient.phone}" title="Phone" />
                        <h:outputText value="Birthdate:"/>
                        <h:inputText id="birthdate" value="#{clientBean.selectedClient.birthdate}" title="Birthdate">
                            <f:convertDateTime pattern="MM/dd/yy" timeZone="EST"/>
                        </h:inputText>
                        <h:outputText value="SIN:"/>
                        <h:inputText id="sin" value="#{clientBean.selectedClient.SIN}" title="SIN" />

                    </h:panelGrid>
                    <h:commandButton action="#{clientBean.save}" value="Submit"/>
                    <h:commandButton action="#{clientBean.cancel}" value="Cancel" immediate="true"/>

                    <br />
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>